package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.SetmealDish;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {

    @Select("select * from setmeal_dish where dish_id=#{id}")
    List<SetmealDish> findById(Long id);

    @Select("select * from setmeal_dish where setmeal_id=#{id}")
    List<SetmealDish> findBySetMealId(Long id);

    @AutoFill(OperationType.INSERT)
    void add(List<SetmealDish> dishes);

    void delete(List<Long> ids);
}
